const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('record_2025', {
    id: {
      autoIncrement: true,
      type: DataTypes.INTEGER,
      allowNull: false,
      primaryKey: true
    },
    name: {
      type: DataTypes.STRING(255),
      allowNull: false,
      comment: "录音文件名"
    },
    time: {
      type: DataTypes.DATE,
      allowNull: false,
      comment: "录音文件修改时间"
    },
    content: {
      type: DataTypes.TEXT,
      allowNull: true,
      comment: "转文字内容"
    },
    channel_id: {
      type: DataTypes.STRING(5),
      allowNull: false,
      comment: "通道编号"
    },
    directory: {
      type: DataTypes.STRING(255),
      allowNull: false,
      comment: "录音文件日期（文件夹名）"
    },
    status: {
      type: DataTypes.INTEGER,
      allowNull: false,
      comment: "是否转成文字，0未转，1已转"
    }
  }, {
    sequelize,
    tableName: 'record_2025',
    timestamps: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "id" },
        ]
      },
    ]
  });
};
